<!--
 * @Author: zheng yong tao
 * @Date: 2022-01-15 15:34:05
 * @LastEditors: zheng yong tao
 * @LastEditTime: 2022-01-27 00:54:56
 * @Description: 
-->
<template>
  <div>
    <div style="display:flex;flex-wrap:wrap;">
      <article-list
        :allArticles="allArticles"
        @refreshData="initData"
      ></article-list>
    </div>
  </div>
</template>

<script>
import articleList from "@/components/article/articleList.vue";
import submitInfo from "./submitInfo.vue";
import { getTels } from "@/config/api";
export default {
  name: "homePage",
  components: {
    articleList,
    submitInfo
  },
  data() {
    return {
      options: [
        {
          value: "address",
          label: "address"
        },
        {
          value: "name",
          label: "name"
        },
        {
          value: "high",
          label: "high"
        }
      ],
      value: "",
      allArticles: []
    };
  },
  mounted() {
    this.initData();
  },
  methods: {
    async initData() {
      const res = await this.httpGet(getTels, {});
      res.code == 1 ? (this.allArticles = res.data) : alert(res.msg);
    }
  },
  beforeDestroy() {}
};
</script>

<style lang="scss" scoped>
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>
